/*

* ------------------------------------------------------------------------
* ------------------------------------------------------------------------
* |     Smart-Shop开源商城系统/ Java商城-首选电商平台系统 请务必保留此注释头信息
* |     开源地址: https://gitee.com/ningbo-qishan/gruul-mall
* ------------------------------------------------------------------------
* ------------------------------------------------------------------------
* |     可正常分享和学习源码,未经授权 不可商用！
* |     商业版中台购买/开源版商业授权 联系技术客服
* |     官网:  https://www.73app.cn/
* ------------------------------------------------------------------------
* ------------------------------------------------------------------------
* |     Copyright (c) 2016-2999 宁波启山智软科技有限公司
* |     版权所有 ,侵权必究！
* ------------------------------------------------------------------------

*/
package com.medusa.gruul.integral.api.entity;

import java.io.Serializable;
import java.math.BigDecimal;

import com.baomidou.mybatisplus.annotation.*;

import java.time.LocalDateTime;

import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.medusa.gruul.common.data.base.BaseEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * <p>
 * 积分优惠券表
 * </p>
 *
 * @author xiaoq
 * @since 2019-11-19
 */
@Data
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
@TableName("t_integral_coupon")
@ApiModel(value = "IntegralCoupon对象", description = "积分优惠券表")
public class IntegralCoupon<T extends Model<?>> extends Model<T> implements Serializable {

	private static final long serialVersionUID = 1L;

	@ApiModelProperty(value = "优惠券id")
	@TableId(value = "coupon_id", type = IdType.AUTO)
	private Long couponId;

	@ApiModelProperty(value = "积分商城表id")
	@TableField("t_integral_shop_id")
	private Long tIntegralShopId;

	@ApiModelProperty(value = "优惠券名称")
	@TableField("coupon_name")
	private String couponName;

	@ApiModelProperty(value = "优惠卷类型（1无门槛折扣卷  2折扣卷 3满减卷  4无门槛现金卷）")
	@TableField("coupon_type")
	private Integer couponType;

	@ApiModelProperty(value = "折扣 (无门槛折扣劵   无门槛现金劵)|(满减劵 满折劵)")
	@TableField("discount")
	private Integer discount;

	@ApiModelProperty(value = "(满折劵|满减劵)  满多少")
	@TableField("meet")
	private Integer meet;

	@ApiModelProperty(value = "发行量")
	@TableField("circulation")
	private Integer circulation;

	@ApiModelProperty(value = "限制领取数")
	@TableField("limit_get")
	private Integer limitGet;

	@ApiModelProperty(value = "所需积分")
	@TableField("integral_price")
	private BigDecimal integralPrice;

	@ApiModelProperty(value = "预留字段")
	@TableField("is_effective")
	private Boolean effective;

	@ApiModelProperty(value = "优惠券生效时间")
	@TableField("effective_starttime")
	private LocalDateTime effectiveStarttime;

	@ApiModelProperty(value = "优惠券失效时间")
	@TableField("effective_endtime")
	private LocalDateTime effectiveEndtime;

	@ApiModelProperty(value = "状态(默认上架，0--下架（仓库中），1--上架，2--已售完)")
	@TableField("status")
	private Integer status;

	@ApiModelProperty(value = "预留字段")
	@TableField("type")
	private Boolean type;

	@ApiModelProperty("租户ID")
	private String tenantId;

	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	@ApiModelProperty("创建时间")
	@TableField(fill = FieldFill.INSERT)

	private LocalDateTime createTime;

	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	@ApiModelProperty("更新时间")
	@TableField(fill = FieldFill.INSERT_UPDATE)


	private LocalDateTime updateTime;
	@TableLogic
	@ApiModelProperty("删除状态：0->未删除；1->已删除")
	@TableField(value = "is_deleted", fill = FieldFill.INSERT)
	private Boolean deleted;


}
